<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.10/dist/vue.js"></script>
    <title>Document</title>
</head>
<body>
    <script>
        //let {name,age} = {name:'李浩洪',age:10};
        //console.log(name);//李浩洪
        //console.log(age);//10
        //let {name:myname,friend:friends} = {name:'李浩洪',friend:['sun','jun']};
        //console.log(name);//空
        //console.log(friend);//报错
        //console.log(myname);//'李浩洪'
        //console.log(friends);//['sun','jun']
        let obj = {name:['李浩洪',{friend:['sun','jun']}]};
        console.log(name);//空
        console.log(name.friend);//空
        console.log(obj.name);//
        console.log(obj.name.friend);
        console.log(obj.name['friend']);
        console.log(obj.name[1]);
    </script>
</body>
</html>